package com.kfm.pm;

public class Demo {

    // 局部内部类 在方法外或者作用域外无法访问 没有访问修饰符
    public void test() {
        int a = 2;
        class InnerClass{
            private int age;
            private String name;

            InnerClass(String name) {
                this.name = name;
            }

            void test02() {
                System.out.println(name);
            }

        }
        InnerClass innerClass = new InnerClass("开发喵");
        innerClass.test02();
    }

    public static void main(String[] args) {
        new Demo().test();
    }
}
